android_setprocnetwork

Binds the current process to |network|. All sockets created in the future (and not explicitly bound via android_setsocknetwork()) will be bound to |network|. All host name resolutions will be limited to |network| as well. Note that if the network identified by |network| ever disconnects, all sockets created in this way will cease to work and all host name resolutions will fail. This is by design so an application doesn't accidentally use sockets it thinks are still bound to a particular network.

To clear a previous process binding, invoke with NETWORK_UNSPECIFIED.

This is the equivalent of: android.net.ConnectivityManager#setProcessDefaultNetwork()

extern (C) nothrow @nogc
int
android_setprocnetwork

Meta